<%--
 *  File:    ClearMasterData.jsp
 *  @Author: visaZhou
 *  Date:    2009/11/11
 *
 *  Copyright (C) 2000 - 2002 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>
<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="java.text.*"%>
<%@ page import="org.apache.log4j.Category" %>
<%@ page import="com.oval.util.*" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>
<% //--------------------------------------  setting logger --%>
<% //--------------------------------------  variant and initialization --%>
<%
	String strModuleName = "COM";
 	String strTableName = "v_backupconfig";
	String privilegeCode = "11503";    
    String contextPath = request.getContextPath(); 
%>
<% //--------------------------------------  include files list --%>
<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/FrmDefault.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>
<%@ include file="/rpt/ReportURL.inc" %>
<html>
<head>
<title>ClearMasterData</title>
<PageFlow:CheckPageFlow pageName="p_backupconfig"/>
<%@ include file="/inc/InitEdit.inc" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="../../css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="../../js/FuncLib.js"></script>
<%@ include file="/inc/SummaryDivision.inc" %>
<% //--------------------------------------  output variant from pageflow --%>
<%
  	Vector totalsummary = (Vector)pageContext.getAttribute("totalsummary");
  	if(totalsummary == null)
  	{
  		totalsummary = new Vector();
  	}
%>

<script language="JavaScript" >
function page_summary(actionvalue,orderbyname){
  	 var editform = summaryPrepare(cform,actionvalue,orderbyname);
 	 editform.action = "BackupMasterData.jsp?<%= OvalTools.randomURL() %>";
 	 editform.target = "_self";
 	 isRunning = true;
 	 editform.submit();
 		
}

function page_do(){
	if(!isEmpty(__searchvalue)){
	var url1 = "<%=reportURL%>/servlet/ExcecuteReport/temp_uploadsaveDate.sox?__format=xlsx&__folder=/ovalreport"+'&'+__searchname+'='+escape(encodeURI(__searchvalue));
	}else{
	var url1 = "<%=reportURL%>/servlet/ExcecuteReport/temp_uploadsaveDate.sox?__format=xlsx&__folder=/ovalreport";
	}
	var strstatus="height=768, width=1024,top=0,left=0,toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no";
    popwindow = window.open(url1, "n1window", strstatus);
}

function page_submit(name)
{     
  document.cform.portname.value= name;
  document.cform.pagename.value='p_zopcallapi';
  document.cform.actionname.value="submit2";
  document.cform.target="_self";
  isRunning = true;
  document.cform.submit();
}	
</script>

</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<form name="cform" method="post" action="<%=contextPath %>/Dispatcher">
<input type="hidden" name="pagename" value="p_backupconfig">
<input type="hidden" name="actionname">
 <input type="hidden" name="portname"> 
<%@ include file="/inc/PageLocation.inc" %>

	<table width="100%" cellspacing="0" cellpadding="0" border="0">
  	<tr> 
    	<td valign="top"> 
    		<table width="100%" border="0" cellspacing="0">
          	<tr><td class="summary_top" ></td></tr>
        	</table>
        	<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<%@ include file="/inc/SummarySearch.inc" %>
        	</table>
        </td>
   	</tr>
   	</table>
   	
<table width="2000" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
        <tr class="deepblue-left">
          <td class="title_center" width="30"><a href="javascript:page_summary('orderby','seqno')"><%= label.getLabelName("L_SeqNumber") %></a></td>
          <td class="title_center" width="80"><a href="javascript:page_summary('orderby','configcode')"><%= label.getLabelName("L_ConfigCode") %></a></td>
          <td class="title_center" width="100"><a href="javascript:page_summary('orderby','configname')"><%= label.getLabelName("L_ConfigName") %></a></td>
          <td class="title_center" width="50"><a href="javascript:page_summary('orderby','runstatus')"><%= label.getLabelName("L_RunStaue") %></a></td>
          <td class="title_center" width="150"><a href="javascript:page_summary('orderby','targettab')"><%= label.getLabelName("L_TargetTable") %></a></td>
          <td class="title_center" width="150"><a href="javascript:page_summary('orderby','sourcetab')"><%= label.getLabelName("L_StartTable") %></a></td>
          <td class="title_center" width="200"><a href="javascript:page_summary('orderby','limitcol')"><%= label.getLabelName("L_RestrictColumn") %></a></td>
          <td class="title_center" width="150"><a href="javascript:page_summary('orderby','excludecol')"><%= label.getLabelName("L_ClearColumn") %></a></td>
          <td class="title_center" width="100"><a href="javascript:page_summary('orderby','lastrunmsg')"><%= label.getLabelName("L_Lastrunmsg") %></a></td>
          <td class="title_center" width="50"><a href="javascript:page_summary('orderby','descr')"><%= label.getLabelName("L_Description") %></a></td>
          <td class="title_center" width="50"><a href="javascript:page_summary('orderby','valuename')"><%= label.getLabelName("L_StatusName") %></a></td>
          <td class="title_center" width="80"><a href="javascript:page_summary('orderby','createdate')"><%= label.getLabelName("L_CreateDate") %></a></td>
          <td class="title_center" width="150"><a href="javascript:page_summary('orderby','begintime')"><%= label.getLabelName("L_StartTime") %></a></td>
          <td class="title_center" width="150"><a href="javascript:page_summary('orderby','endtime')"><%= label.getLabelName("L_EndTime") %></a></td>
          
        </tr>
		 <% //--------------------------------------  default value definition --%>
          	<%
            	int i = 0;
             	String strClassType = new String();
          	%>

          	<% //--------------------------------------  loop results --%>
		<logic:iterate id="onerow" collection="<%= totalsummary %>" indexId="idx">
           	<%
            	HashMap tempMap = (HashMap)pageContext.getAttribute("onerow");
            	if(i%2 == 1)
            	{
              		strClassType = "td-listrom";
            	}else{
              		strClassType = "";
            	}
            	i++;
            	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        		HashMap  myrow=(HashMap)onerow;
        		String displayStartDate;
        		if(myrow.get("begintime") ==null){
        			displayStartDate = "";
        			
        		}else {
        		
            	Date startdate=((Date)myrow.get("begintime"));
            	 displayStartDate = sdf.format(startdate);
        		}
        		String displayEndDate; 
        		if (myrow.get("endtime") == null) {
        			displayEndDate="";
        			
        		}else {
            		Date enddate=((Date)myrow.get("endtime"));
            	 	displayEndDate = sdf.format(enddate);
            	 }
          	%>
          	<tr onMouseOver="this.className='tr-over'" onMouseOut="this.className='<%=JspHelper.filterNull( strClassType )%>'"  class="none">
	          	<td class="title_center" width="30">
						<custom:write name="onerow" property="seqno"  nbsp="true"/>
				</td>
				<td class="title_center" width="80">
						<custom:write name="onerow" property="configcode"  nbsp="true"/>
				</td>
				<td class="title_center" width="100">
						<custom:write name="onerow" property="configname"  nbsp="true"/>
				</td>
				<td class="title_center" width="50">
						<custom:write name="onerow" property="runstatus"  nbsp="true"/>
				</td>
				<td class="title_center" width="150">
						<custom:write name="onerow" property="targettab"  nbsp="true"/>
				</td>
				<td class="title_center" width="150">
						<custom:write name="onerow" property="sourcetab"  nbsp="true"/>
				</td>
				<td class="title_center" width="200">
						<custom:write name="onerow" property="limitcol"  nbsp="true"/>
				</td>
				<td class="title_center" width="150">
						<custom:write name="onerow" property="excludecol"  nbsp="true"/>
				</td>
				<td class="title_center" width="100">
						<custom:write name="onerow" property="lastrunmsg"  nbsp="true"/>
				</td>
				<td class="title_center" width="50">
						<custom:write name="onerow" property="descr"  nbsp="true"/>
				</td>
				<td class="title_center" width="50">
						<custom:write name="onerow" property="statusname"  nbsp="true"/>
				</td>
				<td class="title_center" width="80">
						<custom:write name="onerow" property="createdate"  nbsp="true"/>
				</td>
				<td class="title_center" width="150">&nbsp;<%=displayStartDate %>
            	</td>
            	<td class="title_center" width="150">&nbsp;<%=displayEndDate %>
            	</td>
     	 </logic:iterate>
      
       <%@ include file="/inc/SummaryAction.inc" %>
           </table>
     <table width="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td class="summary_top"></td>
        </tr>
        <tr>
          <td class="td_center">
		  	<a onclick="page_submit('backupdata');"><custom:button type="1" label="L_SaveBaseDate" imgsrc="add.gif" border="0" style="width:115" privilegeCode="11501MB-SJQL01"/></a>

          </td>
		</tr>
     </table>

</form>
</body>
<script>
</script> 
</html>
